package com.jic.market.mapper;

import java.lang.Long;
import java.util.List;

import com.jic.market.entity.LotteryAwards;
import com.jic.market.request.manager.lottery.LotteryAwardsRequest;
import com.jic.market.response.manager.lottery.LotteryAwardsResponse;
import com.jic.market.response.rest.lottery.LotteryAwardsRestResponse;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.velocity.runtime.directive.Foreach;
import org.springframework.stereotype.Repository;

/**
 * 抽奖活动奖品关联表
 * @author : 
 * @email : 
 * @since : 2020-03-03 03:05:46
 * @version : v1.0.0
 */
@Repository
@Mapper
public interface  LotteryAwardsMapper {

    long insert(LotteryAwards lotteryAwards);

    long foreachInsert(List<LotteryAwardsRequest> lotteryAwards);

    long delete(Long id);

    long deleteThemeRefId(Long id);

    long update(LotteryAwards lotteryAwards);

    long updateThemeRefId(@Param("item")LotteryAwardsRequest lotteryAwardsList);

    LotteryAwards queryByPrimaryKey(Long id);

    List<LotteryAwardsResponse> queryByThemeRefId(Long id);

    List<LotteryAwardsRestResponse> queryByThemeRefIdRest(Long id);

    List<LotteryAwards> query(LotteryAwards lotteryAwards);

    List<LotteryAwards> queryPage(@Param("startIndex") int startIndex, @Param("limit") int limit, @Param("lotteryAwards") LotteryAwards lotteryAwards);

    long queryPageCount(LotteryAwards lotteryAwards);
}